home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / KeyStateTester.AMOS / KeyStateTester.amosSourceCode
AMOS Source Code  |  1998-06-24  |  745b  |  37 lines

  1. '*** FINDS THE VALUE TO USE FOR KEY STATE ***
  2.  
  3. '* Alastair Murray 1997 (written 1995) 
  4. '* E-Mail: pmymagm@pmn1.maths.nott.ac.uk 
  5. '* Web Page: http://www.cs.nott.ac.uk/~agm/
  6. '* Including More AMOS stuff 
  7.  
  8. KSTATE
  9. Procedure KSTATE
  10.    S=Screen
  11.    Screen Open 5,320,50,2,Lowres
  12.    Curs Off 
  13.    Flash Off 
  14.    Palette $0,$FFF
  15.    Cls 0
  16.    Paper 0
  17.    Pen 1
  18.    Home 
  19.    Centre "Key State Tester"
  20.    Print 
  21.    Print 
  22.    Centre "Both Shift Keys To Quit"
  23.    Do 
  24.       For A=0 To 127
  25.          If Key State(A)=-1 Then Goto EX
  26.       Next A
  27.       A=-1
  28.       EX:
  29.       If Key State(96)=-1 and Key State(97)=-1 Then Goto AFT
  30.       Locate 0,4
  31.       If A>-1 Then Print A;"   "
  32.       If A=-1 Then Print "---   "
  33.    Loop 
  34.    AFT:
  35.    Screen Close 5
  36.    Screen S
  37. End Proc